<?php
class Application_Model_Base_Mongo implements Application_Model_Base_Interface
{
	private static $_stores = array();
	
	protected $_name = 'groups';
	
	public function update($ids, $values)
	{
		if(is_int($ids))
		{
			$ids = array($ids);
		}
		
		foreach ($ids as $id)
		{
			$currentValue = self::$_stores[$id];
			
			foreach ($values as $key => $value)
			{
				$currentValue[$key] = $value;
			}
			
			self::$_stores[$id] = $currentValue;
		}
	}
	
	public function create($values)
	{
		$id = rand(1, 1000000);
		
		self::$_stores[$id] = $values;
	}
	
	public function remove($ids)
	{
		unset(self::$_stores[$id]);
	}
	
	// $arguments = ['&','|',('name','=','123'),('class','=','123'),('name','=','123')]
	public function search($arguments, $offset = 0, $limit = null, $order = null, $count = false)
	{
		;
	}
	
	public function read($ids, $fields = array('name', 'class'))
	{
		;
	}
}